package com.wuercloud.http.transmit;

import com.wuercloud.http.json.pojo.InfoObject;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;

/**
 * Created by JiangWL on 2017/3/1.
 */
@Component("asyncInfoTaskService")
public class AsyncInfoTaskService {
    @Async
    public void excuteAsyncInfoTask(Object infoObj){
        try {
            Thread.sleep(8000);
            System.out.println("执行异步任务:"+infoObj.toString());
            InfoObject info = (InfoObject)infoObj;
            String bizType = info.getBizType();
            if (bizType.contains("2-")){
                System.out.println("执行门禁信息队列投放");
            }

        } catch (InterruptedException e) {
            e.printStackTrace();
        }

    }
}
